﻿using UnityEngine;
using System.Collections;

public class ForceHandler : MonoBehaviour
{

    public Rigidbody rig;
    public Transform sphere;
    public float speed;

	// Update is called once per frame
	void FixedUpdate () {
	    if (Input.GetKey(KeyCode.W))
        {
            print("click w");
            //rig.AddForce(Vector3.left * speed, ForceMode.Force);
            sphere.Translate(Vector3.left * speed*Time.deltaTime);
        }
        if (Input.GetKey(KeyCode.S))
        {
            print("click w");
            //rig.AddForce(Vector3.right * speed, ForceMode.Force);
            sphere.Translate(Vector3.right * speed * Time.deltaTime);
        }
    }
}
